import React, { useState } from 'react'
import { Table, Button } from 'antd'
export default () => {
    const [selectedRowKeys, setSelectedRowKeys] = useState([])
    const columns:any = [
        {
            title: '文件名称',
            dataIndex: 'name',
            key: 'name',
            render: (text: any) => <a>{text}</a>,
        },
        {
            title: '文件大小',
            dataIndex: 'age',
            key: 'age',
        },
        {
            title: '备份时间',
            dataIndex: 'address',
            key: 'address',
        },
        {
            title: '创建时间',
            key: 'tags',
            dataIndex: 'tags',
        },
        {
            title: '操作',
            align: "center",
            render: (text: any, record: any) => (
                <>
                    <Button size="small" type="primary" ghost style={{ marginRight: "6px" }}>还原</Button>
                    <Button size="small" danger>删除</Button>
                </>
            ),
        },
    ];

    const data = [
        {
            key: '1',
            name: 'John Brown',
            age: "3.2MB",
            address: 'New York No. 1 Lake Park',
            tags: '2018',
        },
        {
            key: '2',
            name: 'Jim Green',
            age: "42MB",
            address: 'London No. 1 Lake Park',
            tags: '2018',
        },
        {
            key: '3',
            name: 'Joe Black',
            age: "32MB",
            address: 'Sidney No. 1 Lake Park',
            tags: '2018',
        },
    ];


    return (
        <Table columns={columns} dataSource={data}  />
    )
}